package com.freshmarket.freshmarket.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.freshmarket.freshmarket.entity.LimitedTimeOffer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.freshmarket.freshmarket.entity.ProductType;
import com.freshmarket.freshmarket.entity.form.KillProduct;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Squirrel
 * @since 2020-09-04
 */
public interface LimitedTimeOfferMapper extends BaseMapper<LimitedTimeOffer> {
    /**
     * 查询所有商品类型
     * @return
     */
    List<ProductType> findProductType();

    /**
     * 查询相同类型下的所有商品id
     * @param id
     * @return
     */
    List<Integer> findByProductTypeId(int id);


    /**
     * 商品展示分页
     * @param page
     * @param id
     * @return
     */
    IPage<KillProduct> pageKillProduct(Page<KillProduct> page,@Param("id") List<Integer> id);


    /**
     * 地址
     */
    List<String> Address();
}
